package com.xo.mall;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;

@SpringBootApplication
@MapperScan("com.xo.mall.mapper")
@Slf4j
public class MallApplication {



    public static void main(String[] args) {

        ConfigurableApplicationContext context = SpringApplication.run(MallApplication.class, args);
        Environment environment = context.getBean(Environment.class);
        log.info("文档地址：http://localhost:{}/doc.html", environment.getProperty("server.port"));
        log.info("文档api：http://localhost:{}/swagger-ui.html", environment.getProperty("server.port"));
        log.info("======================= xo-mall 启动成功 =======================");
    }
}
